home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
os2
/
epmgcc30.zip
/
INSTALL.DOC
< prev
next >
Wrap
Text File
|
1996-07-06
|
13KB
|
260 lines
EPM 6.03 Interface to EMX/GCC, ICC, and other compilers
EPMGCC Version 3.00
Bernhard Bablok
July, 1996
Legal stuff:
~~~~~~~~~~~
See the file license.txt.
Requirements:
~~~~~~~~~~~~
The EMX/GCC interface to EPM supplied with this package needs to be compiled
before it can be incorporated into EPM. You will need to obtain the complete EPM
package (EPM 6.03) from IBM to do this. The EPM package is available for free
from various Internet sites and is part of the Developer Connection CDs.
Note: With Warp, EPM 5.51a is part of OS2. You still need to obtain the
complete package, since you need the source code of the standard set of
e-macros.
Introduction:
~~~~~~~~~~~~
(Skip this section if you are familiar with configuring and compiling EPM).
To understand how the menu and function key support for EMX/GCC is implemented,
one has to understand how IBM's Enhanced Editor EPM works. EPM consists of one
exe-file (EPM.EXE) and a few "ex"-files, normally at least "epm.ex". EPM.EXE
supplies the PM-interface (e. g. message-queue), while the ex-files implement
the functions of the editor via compiled macros. Each ex-file is called a module
and consists of definitions of editor commands, internal procedures, menus, keys
and so on. These definitions are written in a macro language called "E", which
is similar but not identical to REXX. The source files have the extension "e".
Each module is the result of a compilation process of a source file. It is
possible to include other source files in a sort of "master source file".
Normally, the whole set of standard macros are compiled into one module, epm.ex.
This module is loaded at startup of the editor. Additional modules can be
loaded later.
Including source files into a master source file allows not only for an easier
maintenance of code, but allows the inclusion of files depending on
configuration constants (similar to #ifdef #include ... #endif structures in C).
Configuring EPM and adding own applications is made very simple through a trick.
The standard set of E-macros include a number of MY*.E files. These files are
the only ones which have to be changed. Once the MY*.E files are set up, only
epm.e have to be recompiled and the modules have to be located in a
place where the editor can find them.
The following sections deal with the installation of EPM 6.03 and the
modifications necessary on the MY*.E files to install EPMGCC.
Installation of EPM 6.0x:
~~~~~~~~~~~~~~~~~~~~~~~~
The EPM package includes two hypertext files; the EPM User's Manual, and the EPM
Technical Reference. Both of these manuals provide a wealth of information on
EPM. It is highly recommended that you spend some time becoming familiar with
EPM, and the E macro language by reading through them.
EPM consists of a number of *.exe-files (they belong somewhere along your PATH),
*.dll-files (they belong in a directory in your LIBPATH), *.hlp-files (put them
in a directory in your HELP environment variable) and *.inf-files (they should
go in a directory in your BOOKSHELF environment variable). That's it for the
basic installation. NOTE: make sure that all *.exe, *.dll etc. files come before
any files from the standard WARP EPM 5.51a distribution.
As mentioned above, most of the functionality of EPM is contained in macros.
All compiled macros (*.ex-files) must be either in the current directory,
in a directory along the PATH or EPMPATH, or in the directory of EPM.EXE (they
are searched in that order).
The macro translator ETPM.EXE will look for source files in the following
locations (in that order):
- in the current directory
- along the EPMPATH
- along the DPATH
- in the same directory as ETPM.EXE
e.g. if you enter the command `etpm epm`, then epm.e will be searched for in the
directories mentioned above.
I recommend the following setup:
- don't put *.ex files into your EPMPATH, but somewhere along the PATH
- copy all *.ex files except epm.ex (and draw.ex, see below) from the EPM 6.03
package into one directory along your PATH
- recompile draw.e if you do not set the constant WANT_DBCS_SUPPORT=1 in
your mycnf.e
- create the following directory structure
e_macros all my*.e files
├─ epmstd all *.e files of the standard distribution
├─ epmbeta all *.e files of epmbeta
├─ epmgcc all files from EPMGCC
├─ tex all files from the epmtex package (if needed)
├─ modified all modified *.e files from the epmstd, epmbeta
└─ other various *.e files
- setup your EPMPATH to contain all the above directories, make sure that
e_macros\modified comes before e_macros\epmbeta and e_macros\epmstd. Of
course you can add additional directories, depending on the number of
packages you use.
Configuring the editor:
~~~~~~~~~~~~~~~~~~~~~~
"Configuring the editor" means the definition of constants which define the
behavior of the editor like colors, appearance of the mouse, mark-mode and (very
important!) which macros of the standard set are included into the base-module
epm.ex. Configuring is not only important to make EPM look and act like you
expect it to do, but also to save space. For example, I have thrown out all
macros which implement the host support, since my PC is not connected to a host.
This minimizes the startup time of the editor.
Configuration is done by setting up a file called MYCNF.E. This file is included
by various e-macro source file to alter the code at compile time.
Read the section in the EPM user's manual 'Changing the default configuration'
to understand the use of EPM's configuration constants and what they can do. The
binaries included with the EPM package were compiled with the constants defined
in epmgcnf.smp in your e_macros\epmstd subdirectory. If these are OK with you,
copy epmgcnf.smp to a file called mycnf.e in your e_macros directory. I have
also included a file MYCNF.SMP as an example of a configuration file (it is the
one I use).
Important notes: 1) Never put any executable e-code in MYCNF.E!
2) Configuriation for EPM 6.0x should be a bit different from
the configuration for EPM 5.51. See MYCNF.SMP for an example.
3) Please don't just copy MYCNF.SMP to MYCNF.E and then write
mails to me asking why EPM suddenly behaves different.
Implementing EPMGCC:
~~~~~~~~~~~~~~~~~~~
Any additional applications should be implemented via the MY*.E files. They are
included automatically at the right place. The following files are supplied as
samples (extension "smp" instead as "e"):
MYKEYS.E This file should include application key definitions. It is better
to use "TRYINCLUDE" statements, so you don't have to change this
file if a new version of an application is to be used. The sample
file consists of a single statement:
TRYINCLUDE 'gcckeys.e'.
The included file defines some accelerator keys and the
"next-error-key". If the defined keys conflict with key definitions
of other applications, you would have to edit gcckeys.e.
MYSTUFF.E All includes for application macros which should go into the module
epm.ex. The sample file consists of two statements (since I also use
EPMTEX13):
TRYINCLUDE 'tex.e'
TRYINCLUDE 'gcc.e'
If you do not have EPMTEX13, you do not have to remove the first
line - it is ignored by the macro compiler.
Important: none of the *parse.e and *set.e files should be
included via TRYINCLUDE. They must be compiled separately!
MYMNUINI.E This file is included by the standard macro which implements the
menu support. If applications need menu support, their code should
be include